//
//  HttpRequest.h
//  Rail
//
//  Created by hychen on 2018/2/25.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HomeCycleModel.h"
#import "InformationAlertModel.h"
#import "NoticeWarnModel.h"
#import "LineModel.h"
#import "LineDetailModel.h"
#import "SectionModel.h"
#import "StationDetailModel.h"
#import "SectionDetailModel.h"
#import "WorkAreaDetailModel.h"
#import "WorkAreaStatisticModel.h"
#import "CarAccessModel.h"
#import "PatrolLineModel.h"
#import "FactoryTreeModel.h"
#import "FavGroupModel.h"
#import "WorkAreaUserModel.h"
#import "EnvironmentObserverModel.h"
#import "SelectUserInfoModel.h"
#import "AllFavListModel.h"
#import "LineFavModel.h"
#import "DeviceFavModel.h"
#import "WorkAreaFavModel.h"
#import "WatchHistoryModel.h"
#import "WarnDetailModel.h"
#import "DeviceStatusModel.h"
#import "SelectVideoDeviceModel.h"
#import "NewModel.h"
#import "DeviceStatisticModel.h"
#import "DeviceInfoModel.h"
#import "UserDeviceUsedModel.h"
#import "DeviceUserdDetailModel.h"
#import "DeviceUserInfoModel.h"

@interface HttpRequest : NSObject

//首页数据
+ (void)loadHomeListDataSuccess:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure ;

//首页搜索工区
+ (void)searchKeyword:(NSString *)keyword success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//行业资讯
+ (void)loadNewsListDataWithPageNo:(NSString *)pageNo dirId:(NSString *)dirId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//上传头像
+ (void)uploadAvatarWithImage:(UIImage *)image success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

#pragma mark 收藏
//添加收藏
+ (void)addFavWithLineId:(NSString *)lineId areaId:(NSString *)areaId deviceId:(NSString *)deviceId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//取消收藏
+ (void)cancelFavWithFavId:(NSString *)idString success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//收藏栏目列表
+ (void)loadFavGroupListDataSuccess:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//收藏列表
+ (void)loadFavAllListDataSuccess:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//移动收藏分栏
+ (void)moveFavGroupWithFavId:(NSString *)favId groupId:(NSString *)groupId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//添加收藏栏目
+ (void)addFavGroupWithGroupName:(NSString *)groupName success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//修改收藏栏目
+ (void)updateFavGroupWithGroupName:(NSString *)groupName groupId:(NSString *)groupId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//删除收藏栏目
+ (void)deleteFavGroupWithGroupId:(NSString *)groupId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//线路收藏列表
+ (void)loadLineFavDataListSuccess:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//设备收藏列表
+ (void)loadDeviceFavDataListSuccess:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//工区收藏列表
+ (void)loadWorkAreaFavDataListSuccess:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

#pragma mark 监控
//状态监控
+ (void)loadStatusDeviceListDataWithTypeCode:(NSString *)typeCode lineId:(NSString *)lineId stationId:(NSString *)stationId areaId:(NSString *)areaId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//视频终端列表
+ (void)loadDeviceVideoListDataWithAreaId:(NSString *)areaId status:(NSString *)status pageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//视频终端详情
+ (void)loadDeviceVideoDetailDataWithDeviceId:(NSString *)deviceId  success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

#pragma mark 消息报警
//消息首页 - 报警统计
+ (void)loadInformationWithAlertStatisticSuccess:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//消息 - 公告通知
+ (void)loadNoticeListWithPage:(NSString *)page success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//处理报警
+ (void)handleWarnWithRecordId:(NSString *)recordId text:(NSString *)text success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//报警记录
+ (void)loadWarnListDataWithStatus:(NSString *)status alertType:(NSString *)alertType eventLevel:(NSString *)eventLevel eventId:(NSString *)eventId pageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//报警详情
+ (void)loadWarnDetailDataWithRecordId:(NSString *)recordId  success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//当前报警记录(消息首页)
+ (void)loadCurrentWarnListDataWithPageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//报警录入
/*
    报警抓拍页面固定传入参数 事件名称固定 @"人工抓拍报警事件"
 alert_type @"" //传空字符
 eventid @"b0119999"
 event_type @"100" //设备报警事件
 start_time
 end_time
 source_type @"1" //手动录入
 */
+ (void)addAlertRecordWithAreaId:(NSString *)areaId deviceId:(NSString *)deviceId deviceName:(NSString *)deviceName chNo:(NSString *)chNo content:(NSString *)content alertType:(NSString *)alertType eventId:(NSString *)eventId eventType:(NSString *)eventType eventLevel:(NSString *)eventLevel startTime:(NSString *)startTime endTime:(NSString *)endTime sourceType:(NSString *)sourceType snapshotImage1:(UIImage *)image1 snapshotImage2:(UIImage *)image2 snapshotImage3:(UIImage *)image3 videoUrl:(NSData *)videoData success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

#pragma mark 线路管理
//线路查询
+ (void)loadLineListWithKeyword:(NSString *)keyword success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//线路层级（线路详情）
+ (void)loadLineDetailTreeWithKeyword:(NSString *)keyword lineId:(NSString *)lineId lineStatus:(NSString *)lineStatus success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//线路详情
+ (void)loadLineDetailDataWithLineId:(NSString *)lineId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//站点详情
+ (void)loadStationDetailDataWithStationId:(NSString *)stationId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//标段详情
+ (void)loadSectionDetailDataWithSectionId:(NSString *)sectionId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//工区详情
+ (void)loadFactoryDetailDataWithAreaId:(NSString *)areaId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//工区统计数据
+ (void)loadFactoryStatisticDataWithAreaId:(NSString *)areaId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//标段列表 线路标识/站点id 二选一为idString
+ (void)loadLineSectionDataWithLineId:(NSString *)lineId stationId:(NSString *)stationId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//工区人员列表
+ (void)loadFactoryUserListWithAreaId:(NSString *)areaId type:(NSString *)type pageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//工区环境监测记录
+ (void)loadEnvironmentRecordListWithAreaId:(NSString *)areaId pageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;
#pragma mark 车辆管理
//车辆进出记录
+ (void)loadCarAccessListDataWithQueryDate:(NSString *)queryDate pageNum:(NSString *)page areaId:(NSString *)areaId plateNum:(NSString *)plateNum success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//车辆进岗登记
+ (void)requestCarInWithPlateNum:(NSString *)plateNum driveName:(NSString *)driveName mobile:(NSString *)mobile driverCard:(NSString *)driveCard carType:(CarType)carType areaId:(NSString *)areaId note:(NSString *)note driverImage:(UIImage *)driverImage inTime:(NSString *)inTime inImage1:(UIImage *)image1 inImage2:(UIImage *)image2 success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//车辆离岗登记
+ (void)requestCarLogoutWithRecordId:(NSString *)recordId outTime:(NSString *)outTime outImage1:(UIImage *)image1 outImage2:(UIImage *)image2 success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

#pragma mark - 巡线管理
//巡线照片
+ (void)loadPatrolLinePhotoListDataWithPage:(NSString *)page success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//巡线拍照(上传视频或者图片)
+ (void)uploadPatrolLineDataWithAreaId:(NSString *)areaId deviceId:(NSString *)deviceId deviceName:(NSString *)deviceName channelName:(NSString *)cnName note:(NSString *)note image1:(UIImage *)image1 image2:(UIImage *)image2 image3:(UIImage *)image3 success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//删除巡线拍照
+ (void)deletePatrolLineDataWithSeqId:(NSString *)seqId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//工区列表(树形)
+ (void)loadWorkareaListDataSuccess:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

#pragma mark - 人脸管理
//采集人员列表
+ (void)loadGatherFaceUserListDataWithPageNo:(NSString *)pageNo keywork:(NSString *)keyword success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//人脸采集
+ (void)uploadGatherFaceUserDataWithUserId:(NSString *)userId type:(NSInteger)type visitorName:(NSString *)visitorName image1:(UIImage *)image1 image2:(UIImage *)image2 image3:(UIImage *)image3 success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//删除人脸采集
+ (void)deleteFaceDataWithSeqid:(NSString *)seqid success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

#pragma mark - 历史观看记录
//历史观看列表
/*
 0-30条记录
 1-1个月记录
 2-1周记录
 */
+ (void)loadHistoryWatchListDataWithType:(NSString *)type success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//添加最近观看
+ (void)addHistoryWatchDataWithAreaId:(NSString *)areaId deviceId:(NSString *)deviceId deviceName:(NSString *)deviceName chName:(NSString *)chName success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//删除最近观看
+ (void)deleteHistoryWatchDataWithSeqId:(NSString *)seqId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//新增视频历史观看记录
+ (void)addVideoHistoryDataWithDeviceId:(NSString *)deviceId areaId:(NSString *)areaId image:(UIImage *)image  success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

#pragma mark - 设备领用
/// 工区设备
+ (void)loadAreaDeviceListDataWithAreaId:(NSString *)areaId typeCode:(NSString *)typeCode pageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 设备领用列表
+ (void)loadDeviceUsedListDataWithKeyword:(NSString *)keyword pageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 选择设备列表
+ (void)loadSelectDeviceListDataWithKeyword:(NSString *)keyword pageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 领用定位设备
+ (void)getLocateDeviceWithDeviceId:(NSString *)deviceId UserType:(NSString *)userType userAccount:(nullable NSString *)userAccount mobile:(nullable NSString *)mobile username:(nullable NSString *)username company:(nullable NSString *)company success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 归还定位设备
+ (void)returnLocateDeviceWithDeviceId:(NSString *)deviceId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 人员领用设备列表 userAccount访客传空
+ (void)loadUserDeviceUsedListDataWithUserAccount:(nullable NSString *)userAccount mobile:(nullable NSString *)mobile areaId:(NSString *)areaId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 获取设备领用信息
+ (void)loadDeviceUsedDetailDataWithDeviceId:(NSString *)deviceId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 获取设备领用人员列表
+ (void)loadDevicePickUserListDataWithKeyword:(NSString *)keyword pageNo:(NSString *)pageNo success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 领取对讲设备
+ (void)getTbkDeviceWithAccount:(NSString *)account userType:(NSString *)userType mobile:(NSString *)mobile userName:(NSString *)userName company:(NSString *)company deviceId:(NSString *)deviceId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

/// 归还对讲设备
+ (void)returnTbkDeviceWithDeviceId:(NSString *)deviceId account:(NSString *)account success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;

//获取对讲设备详情
+ (void)getTbkDeviceDetailWithDeviceId:(NSString *)deviceId success:(NetWorkSuccessBlock)success failure:(NetWorkFailureBlock)failure;
@end
